{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import sys\n",
    "sys.path.append('..')\n",
    "import db\n",
    "import inspect\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import scipy.stats as stats\n",
    "import numpy as np\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "conn=db.get_conn()\n",
    "data_original=pd.read_sql(sql=\"select * from _201904 where monthly_salary>0 and monthly_salary<15\", con=conn)\n",
    "conn.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "error_job_ids=['104660258','104142922','108434795','101357291','106253516','110368302','111391233','108665401','109277048'\n",
    "                  ,'73857191','108584955','102824950','102824949','111391233','110884556']\n",
    "data=data_original[~data_original.job_id.isin(error_job_ids)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "del data['publish_date']\n",
    "del data['published_on_weekend']\n",
    "del data['title']\n",
    "del data['company_title']\n",
    "del data['company_description']\n",
    "del data['job_description']\n",
    "del data['job_id']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_sub_stats(data, prefix):\n",
    "    \n",
    "    features = [feature for feature in data.columns if feature.startswith(prefix)]\n",
    "    salary_mean=[]\n",
    "    salary_median=[]\n",
    "    count=[]\n",
    "    for feature in features:\n",
    "        salary_mean.append(data[data[feature]==1].monthly_salary.mean()*10000)\n",
    "        salary_median.append(data[data[feature]==1].monthly_salary.median()*10000)\n",
    "        count.append(data[data[feature]==1].shape[0])\n",
    "    sub_data=pd.DataFrame()\n",
    "    sub_data[prefix]=[f.replace(prefix,'') for f in features]\n",
    "    sub_data['salary_mean']=salary_mean\n",
    "    sub_data['salary_median']=salary_median\n",
    "    sub_data['head_count']=count\n",
    "    sub_data['percentage']=count/np.sum(count)\n",
    "    sub_data=sub_data.sort_values(by='salary_mean', ascending=False)\n",
    "\n",
    "    return sub_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "def add_category_column(data, prefix):\n",
    "    prefix_=prefix+\"_\"\n",
    "    features = [feature for feature in data.columns if feature.startswith(prefix)]\n",
    "    data.loc[:,prefix]=['']*data.shape[0]\n",
    "    for feature in features:\n",
    "        data.loc[data[feature]==1,prefix]=feature.replace(prefix_,'')\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py:362: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  self.obj[key] = _infer_fill_value(value)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py:543: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  self.obj[item] = s\n"
     ]
    }
   ],
   "source": [
    "data=add_category_column(data,'city')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 城市 City"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style>  \n",
       "<table id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031ef\" > \n",
       "<thead>    <tr> \n",
       "        <th class=\"blank level0\" ></th> \n",
       "        <th class=\"col_heading level0 col0\" >city_</th> \n",
       "        <th class=\"col_heading level0 col1\" >salary_mean</th> \n",
       "        <th class=\"col_heading level0 col2\" >salary_median</th> \n",
       "        <th class=\"col_heading level0 col3\" >head_count</th> \n",
       "        <th class=\"col_heading level0 col4\" >percentage</th> \n",
       "    </tr></thead> \n",
       "<tbody>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row0\" class=\"row_heading level0 row0\" >0</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow0_col0\" class=\"data row0 col0\" >beijing</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow0_col1\" class=\"data row0 col1\" >17453</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow0_col2\" class=\"data row0 col2\" >15000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow0_col3\" class=\"data row0 col3\" >13823</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow0_col4\" class=\"data row0 col4\" >9.90%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row1\" class=\"row_heading level0 row1\" >17</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow1_col0\" class=\"data row1 col0\" >shanghai</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow1_col1\" class=\"data row1 col1\" >16626</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow1_col2\" class=\"data row1 col2\" >15000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow1_col3\" class=\"data row1 col3\" >25888</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow1_col4\" class=\"data row1 col4\" >18.55%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row2\" class=\"row_heading level0 row2\" >19</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow2_col0\" class=\"data row2 col0\" >shenzhen</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow2_col1\" class=\"data row2 col1\" >15631</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow2_col2\" class=\"data row2 col2\" >14000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow2_col3\" class=\"data row2 col3\" >20757</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow2_col4\" class=\"data row2 col4\" >14.87%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row3\" class=\"row_heading level0 row3\" >9</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow3_col0\" class=\"data row3 col0\" >hangzhou</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow3_col1\" class=\"data row3 col1\" >14977</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow3_col2\" class=\"data row3 col2\" >12500</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow3_col3\" class=\"data row3 col3\" >8690</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow3_col4\" class=\"data row3 col4\" >6.23%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row4\" class=\"row_heading level0 row4\" >8</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow4_col0\" class=\"data row4 col0\" >guangzhou</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow4_col1\" class=\"data row4 col1\" >13032</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow4_col2\" class=\"data row4 col2\" >12000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow4_col3\" class=\"data row4 col3\" >17068</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow4_col4\" class=\"data row4 col4\" >12.23%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row5\" class=\"row_heading level0 row5\" >14</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow5_col0\" class=\"data row5 col0\" >nanjing</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow5_col1\" class=\"data row5 col1\" >12874</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow5_col2\" class=\"data row5 col2\" >12500</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow5_col3\" class=\"data row5 col3\" >7091</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow5_col4\" class=\"data row5 col4\" >5.08%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row6\" class=\"row_heading level0 row6\" >3</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow6_col0\" class=\"data row6 col0\" >chengdu</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow6_col1\" class=\"data row6 col1\" >11896</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow6_col2\" class=\"data row6 col2\" >11500</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow6_col3\" class=\"data row6 col3\" >7028</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow6_col4\" class=\"data row6 col4\" >5.04%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row7\" class=\"row_heading level0 row7\" >6</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow7_col0\" class=\"data row7 col0\" >dongguan</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow7_col1\" class=\"data row7 col1\" >11353</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow7_col2\" class=\"data row7 col2\" >10417</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow7_col3\" class=\"data row7 col3\" >1632</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow7_col4\" class=\"data row7 col4\" >1.17%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row8\" class=\"row_heading level0 row8\" >22</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow8_col0\" class=\"data row8 col0\" >xian</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow8_col1\" class=\"data row8 col1\" >11075</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow8_col2\" class=\"data row8 col2\" >10000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow8_col3\" class=\"data row8 col3\" >3833</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow8_col4\" class=\"data row8 col4\" >2.75%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row9\" class=\"row_heading level0 row9\" >21</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow9_col0\" class=\"data row9 col0\" >wuhan</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow9_col1\" class=\"data row9 col1\" >11074</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow9_col2\" class=\"data row9 col2\" >10417</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow9_col3\" class=\"data row9 col3\" >8027</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow9_col4\" class=\"data row9 col4\" >5.75%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row10\" class=\"row_heading level0 row10\" >20</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow10_col0\" class=\"data row10 col0\" >tianjin</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow10_col1\" class=\"data row10 col1\" >10988</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow10_col2\" class=\"data row10 col2\" >10000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow10_col3\" class=\"data row10 col3\" >1147</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow10_col4\" class=\"data row10 col4\" >0.82%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row11\" class=\"row_heading level0 row11\" >2</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow11_col0\" class=\"data row11 col0\" >changsha</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow11_col1\" class=\"data row11 col1\" >10847</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow11_col2\" class=\"data row11 col2\" >10000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow11_col3\" class=\"data row11 col3\" >3354</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow11_col4\" class=\"data row11 col4\" >2.40%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row12\" class=\"row_heading level0 row12\" >15</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow12_col0\" class=\"data row12 col0\" >ningbo</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow12_col1\" class=\"data row12 col1\" >10809</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow12_col2\" class=\"data row12 col2\" >10000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow12_col3\" class=\"data row12 col3\" >1485</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow12_col4\" class=\"data row12 col4\" >1.06%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row13\" class=\"row_heading level0 row13\" >7</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow13_col0\" class=\"data row13 col0\" >fuzhou</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow13_col1\" class=\"data row13 col1\" >10062</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow13_col2\" class=\"data row13 col2\" >9000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow13_col3\" class=\"data row13 col3\" >2085</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow13_col4\" class=\"data row13 col4\" >1.49%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row14\" class=\"row_heading level0 row14\" >5</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow14_col0\" class=\"data row14 col0\" >dalian</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow14_col1\" class=\"data row14 col1\" >10030</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow14_col2\" class=\"data row14 col2\" >9000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow14_col3\" class=\"data row14 col3\" >2889</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow14_col4\" class=\"data row14 col4\" >2.07%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row15\" class=\"row_heading level0 row15\" >4</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow15_col0\" class=\"data row15 col0\" >chongqing</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow15_col1\" class=\"data row15 col1\" >10017</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow15_col2\" class=\"data row15 col2\" >9000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow15_col3\" class=\"data row15 col3\" >2570</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow15_col4\" class=\"data row15 col4\" >1.84%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row16\" class=\"row_heading level0 row16\" >16</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow16_col0\" class=\"data row16 col0\" >qingdao</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow16_col1\" class=\"data row16 col1\" >9549</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow16_col2\" class=\"data row16 col2\" >8750</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow16_col3\" class=\"data row16 col3\" >1385</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow16_col4\" class=\"data row16 col4\" >0.99%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row17\" class=\"row_heading level0 row17\" >12</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow17_col0\" class=\"data row17 col0\" >jinan</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow17_col1\" class=\"data row17 col1\" >9375</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow17_col2\" class=\"data row17 col2\" >8500</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow17_col3\" class=\"data row17 col3\" >1479</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow17_col4\" class=\"data row17 col4\" >1.06%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row18\" class=\"row_heading level0 row18\" >11</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow18_col0\" class=\"data row18 col0\" >hefei</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow18_col1\" class=\"data row18 col1\" >9252</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow18_col2\" class=\"data row18 col2\" >8500</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow18_col3\" class=\"data row18 col3\" >3071</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow18_col4\" class=\"data row18 col4\" >2.20%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row19\" class=\"row_heading level0 row19\" >1</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow19_col0\" class=\"data row19 col0\" >changchun</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow19_col1\" class=\"data row19 col1\" >8580</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow19_col2\" class=\"data row19 col2\" >7000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow19_col3\" class=\"data row19 col3\" >614</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow19_col4\" class=\"data row19 col4\" >0.44%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row20\" class=\"row_heading level0 row20\" >13</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow20_col0\" class=\"data row20 col0\" >kuming</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow20_col1\" class=\"data row20 col1\" >8458</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow20_col2\" class=\"data row20 col2\" >8000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow20_col3\" class=\"data row20 col3\" >1011</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow20_col4\" class=\"data row20 col4\" >0.72%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row21\" class=\"row_heading level0 row21\" >23</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow21_col0\" class=\"data row21 col0\" >zhengzhou</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow21_col1\" class=\"data row21 col1\" >8348</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow21_col2\" class=\"data row21 col2\" >7000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow21_col3\" class=\"data row21 col3\" >2317</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow21_col4\" class=\"data row21 col4\" >1.66%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row22\" class=\"row_heading level0 row22\" >18</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow22_col0\" class=\"data row22 col0\" >shenyang</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow22_col1\" class=\"data row22 col1\" >7851</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow22_col2\" class=\"data row22 col2\" >7000</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow22_col3\" class=\"data row22 col3\" >1452</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow22_col4\" class=\"data row22 col4\" >1.04%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031eflevel0_row23\" class=\"row_heading level0 row23\" >10</th> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow23_col0\" class=\"data row23 col0\" >harbin</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow23_col1\" class=\"data row23 col1\" >6403</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow23_col2\" class=\"data row23 col2\" >5250</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow23_col3\" class=\"data row23 col3\" >870</td> \n",
       "        <td id=\"T_3b3a1046_58f6_11e9_b1c9_701ce71031efrow23_col4\" class=\"data row23 col4\" >0.62%</td> \n",
       "    </tr></tbody> \n",
       "</table> "
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x1ff17fd6d68>"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_city=get_sub_stats(data,'city_')\n",
    "data_city.style.format({\"percentage\":\"{:.2%}\",\"salary_mean\":\"{:.0f}\",\"salary_median\":\"{:.0f}\"})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "程序员收入最高的城市分别为：北京，上海，深圳，广州"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "translate_dict={}\n",
    "translate_dict['beijing']='北京'\n",
    "translate_dict['shanghai']='上海'\n",
    "translate_dict['shenzhen']='深圳'\n",
    "translate_dict['hangzhou']='杭州'\n",
    "translate_dict['guangzhou']='广州'\n",
    "translate_dict['nanjing']='南京'\n",
    "translate_dict['chengdu']='成都'\n",
    "translate_dict['dongguan']='东莞'\n",
    "translate_dict['xian']='西安'\n",
    "translate_dict['wuhan']='武汉'\n",
    "translate_dict['tianjin']='天津'\n",
    "translate_dict['changsha']='长沙'\n",
    "translate_dict['ningbo']='宁波'\n",
    "translate_dict['fuzhou']='福州'\n",
    "translate_dict['dalian']='大连'\n",
    "translate_dict['chongqing']='重庆'\n",
    "translate_dict['qingdao']='青岛'\n",
    "translate_dict['jinan']='济南'\n",
    "translate_dict['hefei']='合肥'\n",
    "translate_dict['changchun']='长春'\n",
    "translate_dict['kuming']='昆明'\n",
    "translate_dict['zhengzhou']='郑州'\n",
    "translate_dict['shenyang']='沈阳'\n",
    "translate_dict['harbin']='哈尔滨'\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "map_data_salary = []\n",
    "map_data_headcount = []\n",
    "for index , row in data_city.iterrows():\n",
    "    map_data_salary.append((translate_dict[row[0]],row[1]))\n",
    "    map_data_headcount.append((translate_dict[row[0]],row[3]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min', 'china': '/nbextensions/echarts-countries-js/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"c54ed080c1fa442bb4100eb5c1707a10\" style=\"width:800px;height:400px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'china'], function(echarts) {\n",
       "        \n",
       "var myChart_c54ed080c1fa442bb4100eb5c1707a10 = echarts.init(document.getElementById('c54ed080c1fa442bb4100eb5c1707a10'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_c54ed080c1fa442bb4100eb5c1707a10 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 99446,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"symbol\": \"circle\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 17453.108345993664\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 16626.36581942798\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6df1\\u5733\",\n",
       "                    \"value\": 15631.343241638102\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u676d\\u5dde\",\n",
       "                    \"value\": 14976.923667050029\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\",\n",
       "                    \"value\": 13031.734825404565\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u4eac\",\n",
       "                    \"value\": 12874.243172095825\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": 11895.973249857449\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u839e\",\n",
       "                    \"value\": 11352.660334967399\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": 11075.391338377314\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u6c49\",\n",
       "                    \"value\": 11074.196461940654\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 10987.852368497548\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6c99\",\n",
       "                    \"value\": 10847.045815941241\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u6ce2\",\n",
       "                    \"value\": 10809.416386083123\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5dde\",\n",
       "                    \"value\": 10062.398081534848\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u8fde\",\n",
       "                    \"value\": 10030.425752855752\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 10016.517509727699\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u5c9b\",\n",
       "                    \"value\": 9548.856799037349\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d4e\\u5357\",\n",
       "                    \"value\": 9375.090151002996\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5408\\u80a5\",\n",
       "                    \"value\": 9251.720395094035\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6625\",\n",
       "                    \"value\": 8579.913137893585\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6606\\u660e\",\n",
       "                    \"value\": 8457.888229475755\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u90d1\\u5dde\",\n",
       "                    \"value\": 8348.115379082297\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c88\\u9633\",\n",
       "                    \"value\": 7850.849403122135\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u5c14\\u6ee8\",\n",
       "                    \"value\": 6402.6245210727275\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"showLegendSymbol\": true\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"animation\": true,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_c54ed080c1fa442bb4100eb5c1707a10.setOption(option_c54ed080c1fa442bb4100eb5c1707a10);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.map.Map at 0x1ff2012db00>"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Map\n",
    "job_map=Map()\n",
    "attr, value = geo.cast(map_data)\n",
    "job_map.add(name='',attr=attr,value=value, maptype='china',is_label_show=True)\n",
    "job_map"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min', 'china': '/nbextensions/echarts-countries-js/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"732c2c3b07ad4a3bb51642280cd4bece\" style=\"width:1000px;height:600px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'china'], function(echarts) {\n",
       "        \n",
       "var myChart_732c2c3b07ad4a3bb51642280cd4bece = echarts.init(document.getElementById('732c2c3b07ad4a3bb51642280cd4bece'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_732c2c3b07ad4a3bb51642280cd4bece = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5168\\u56fd\\u4e3b\\u8981\\u57ce\\u5e02\\u7a0b\\u5e8f\\u5458\\u5de5\\u8d44\",\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 4244337,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": \"{b}: {c}\",\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"symbol\": \"circle\",\n",
       "            \"symbolSize\": 10,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        116.407526,\n",
       "                        39.90403,\n",
       "                        17453.108345993664\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.473701,\n",
       "                        31.230416,\n",
       "                        16626.36581942798\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6df1\\u5733\",\n",
       "                    \"value\": [\n",
       "                        114.07,\n",
       "                        22.62,\n",
       "                        15631.343241638102\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u676d\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        120.19,\n",
       "                        30.26,\n",
       "                        14976.923667050029\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.23,\n",
       "                        23.16,\n",
       "                        13031.734825404565\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        118.78,\n",
       "                        32.04,\n",
       "                        12874.243172095825\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": [\n",
       "                        104.06,\n",
       "                        30.67,\n",
       "                        11895.973249857449\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u839e\",\n",
       "                    \"value\": [\n",
       "                        113.75,\n",
       "                        23.04,\n",
       "                        11352.660334967399\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": [\n",
       "                        108.95,\n",
       "                        34.27,\n",
       "                        11075.391338377314\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u6c49\",\n",
       "                    \"value\": [\n",
       "                        114.31,\n",
       "                        30.52,\n",
       "                        11074.196461940654\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        117.200983,\n",
       "                        39.084158,\n",
       "                        10987.852368497548\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6c99\",\n",
       "                    \"value\": [\n",
       "                        113,\n",
       "                        28.21,\n",
       "                        10847.045815941241\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u6ce2\",\n",
       "                    \"value\": [\n",
       "                        121.56,\n",
       "                        29.86,\n",
       "                        10809.416386083123\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        119.3,\n",
       "                        26.08,\n",
       "                        10062.398081534848\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u8fde\",\n",
       "                    \"value\": [\n",
       "                        121.62,\n",
       "                        38.92,\n",
       "                        10030.425752855752\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        106.551556,\n",
       "                        29.563009,\n",
       "                        10016.517509727699\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u5c9b\",\n",
       "                    \"value\": [\n",
       "                        120.33,\n",
       "                        36.07,\n",
       "                        9548.856799037349\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d4e\\u5357\",\n",
       "                    \"value\": [\n",
       "                        117,\n",
       "                        36.65,\n",
       "                        9375.090151002996\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5408\\u80a5\",\n",
       "                    \"value\": [\n",
       "                        117.27,\n",
       "                        31.86,\n",
       "                        9251.720395094035\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6625\",\n",
       "                    \"value\": [\n",
       "                        125.35,\n",
       "                        43.88,\n",
       "                        8579.913137893585\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6606\\u660e\",\n",
       "                    \"value\": [\n",
       "                        102.73,\n",
       "                        25.04,\n",
       "                        8457.888229475755\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u90d1\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.65,\n",
       "                        34.76,\n",
       "                        8348.115379082297\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c88\\u9633\",\n",
       "                    \"value\": [\n",
       "                        123.38,\n",
       "                        41.8,\n",
       "                        7850.849403122135\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u5c14\\u6ee8\",\n",
       "                    \"value\": [\n",
       "                        126.63,\n",
       "                        45.75,\n",
       "                        6402.6245210727275\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#404a59\",\n",
       "    \"animation\": true,\n",
       "    \"geo\": {\n",
       "        \"map\": \"china\",\n",
       "        \"roam\": true,\n",
       "        \"label\": {\n",
       "            \"emphasis\": {\n",
       "                \"show\": true,\n",
       "                \"textStyle\": {\n",
       "                    \"color\": \"#eee\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        \"itemStyle\": {\n",
       "            \"normal\": {\n",
       "                \"areaColor\": \"#323c48\",\n",
       "                \"borderColor\": \"#111\"\n",
       "            },\n",
       "            \"emphasis\": {\n",
       "                \"areaColor\": \"#2a333d\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 6402.6245210727275,\n",
       "        \"max\": 17453.108345993664,\n",
       "        \"text\": [\n",
       "            \"high\",\n",
       "            \"low\"\n",
       "        ],\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\"\n",
       "        },\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"left\",\n",
       "        \"top\": \"bottom\",\n",
       "        \"showLabel\": true\n",
       "    }\n",
       "};\n",
       "myChart_732c2c3b07ad4a3bb51642280cd4bece.setOption(option_732c2c3b07ad4a3bb51642280cd4bece);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.geo.Geo at 0x1ff3277c4a8>"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Geo\n",
    "\n",
    "geo = Geo(\"全国主要城市程序员工资\", \"\", title_color=\"#fff\",\n",
    "          title_pos=\"center\", width=1000,\n",
    "          height=600, background_color='#404a59')\n",
    "attr, value = geo.cast(map_data)\n",
    "geo.add(\"\", attr, value, visual_range=[min(value), max(value)], maptype='china',visual_text_color=\"#fff\", symbol_size=10,is_visualmap=True, is_label_show=True)\n",
    "\n",
    "geo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts import Geo\n",
    "\n",
    "geo = Geo(\"全国主要城市程序员工资\", \"\", title_color=\"#fff\",\n",
    "          title_pos=\"center\", width=1000,\n",
    "          height=600, background_color='#404a59')\n",
    "attr, value = geo.cast(map_data_headcount)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min', 'china': '/nbextensions/echarts-countries-js/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"059c67ea61f3454fb6da93653f43208d\" style=\"width:1000px;height:600px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'china'], function(echarts) {\n",
       "        \n",
       "var myChart_059c67ea61f3454fb6da93653f43208d = echarts.init(document.getElementById('059c67ea61f3454fb6da93653f43208d'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_059c67ea61f3454fb6da93653f43208d = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5168\\u56fd\\u4e3b\\u8981\\u57ce\\u5e02\\u7a0b\\u5e8f\\u5458\\u5de5\\u8d44\",\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 3862177,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": \"{b}: {c}\",\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"symbol\": \"circle\",\n",
       "            \"symbolSize\": 10,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        116.407526,\n",
       "                        39.90403,\n",
       "                        17453.108345993664\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.473701,\n",
       "                        31.230416,\n",
       "                        16626.36581942798\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6df1\\u5733\",\n",
       "                    \"value\": [\n",
       "                        114.07,\n",
       "                        22.62,\n",
       "                        15631.343241638102\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u676d\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        120.19,\n",
       "                        30.26,\n",
       "                        14976.923667050029\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.23,\n",
       "                        23.16,\n",
       "                        13031.734825404565\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        118.78,\n",
       "                        32.04,\n",
       "                        12874.243172095825\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": [\n",
       "                        104.06,\n",
       "                        30.67,\n",
       "                        11895.973249857449\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u839e\",\n",
       "                    \"value\": [\n",
       "                        113.75,\n",
       "                        23.04,\n",
       "                        11352.660334967399\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": [\n",
       "                        108.95,\n",
       "                        34.27,\n",
       "                        11075.391338377314\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u6c49\",\n",
       "                    \"value\": [\n",
       "                        114.31,\n",
       "                        30.52,\n",
       "                        11074.196461940654\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        117.200983,\n",
       "                        39.084158,\n",
       "                        10987.852368497548\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6c99\",\n",
       "                    \"value\": [\n",
       "                        113,\n",
       "                        28.21,\n",
       "                        10847.045815941241\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u6ce2\",\n",
       "                    \"value\": [\n",
       "                        121.56,\n",
       "                        29.86,\n",
       "                        10809.416386083123\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        119.3,\n",
       "                        26.08,\n",
       "                        10062.398081534848\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u8fde\",\n",
       "                    \"value\": [\n",
       "                        121.62,\n",
       "                        38.92,\n",
       "                        10030.425752855752\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        106.551556,\n",
       "                        29.563009,\n",
       "                        10016.517509727699\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u5c9b\",\n",
       "                    \"value\": [\n",
       "                        120.33,\n",
       "                        36.07,\n",
       "                        9548.856799037349\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d4e\\u5357\",\n",
       "                    \"value\": [\n",
       "                        117,\n",
       "                        36.65,\n",
       "                        9375.090151002996\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5408\\u80a5\",\n",
       "                    \"value\": [\n",
       "                        117.27,\n",
       "                        31.86,\n",
       "                        9251.720395094035\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6625\",\n",
       "                    \"value\": [\n",
       "                        125.35,\n",
       "                        43.88,\n",
       "                        8579.913137893585\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6606\\u660e\",\n",
       "                    \"value\": [\n",
       "                        102.73,\n",
       "                        25.04,\n",
       "                        8457.888229475755\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u90d1\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.65,\n",
       "                        34.76,\n",
       "                        8348.115379082297\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c88\\u9633\",\n",
       "                    \"value\": [\n",
       "                        123.38,\n",
       "                        41.8,\n",
       "                        7850.849403122135\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u5c14\\u6ee8\",\n",
       "                    \"value\": [\n",
       "                        126.63,\n",
       "                        45.75,\n",
       "                        6402.6245210727275\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": false,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"symbol\": \"circle\",\n",
       "            \"symbolSize\": 10,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        116.407526,\n",
       "                        39.90403,\n",
       "                        17453.108345993664\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.473701,\n",
       "                        31.230416,\n",
       "                        16626.36581942798\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6df1\\u5733\",\n",
       "                    \"value\": [\n",
       "                        114.07,\n",
       "                        22.62,\n",
       "                        15631.343241638102\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u676d\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        120.19,\n",
       "                        30.26,\n",
       "                        14976.923667050029\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.23,\n",
       "                        23.16,\n",
       "                        13031.734825404565\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        118.78,\n",
       "                        32.04,\n",
       "                        12874.243172095825\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": [\n",
       "                        104.06,\n",
       "                        30.67,\n",
       "                        11895.973249857449\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u839e\",\n",
       "                    \"value\": [\n",
       "                        113.75,\n",
       "                        23.04,\n",
       "                        11352.660334967399\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": [\n",
       "                        108.95,\n",
       "                        34.27,\n",
       "                        11075.391338377314\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u6c49\",\n",
       "                    \"value\": [\n",
       "                        114.31,\n",
       "                        30.52,\n",
       "                        11074.196461940654\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        117.200983,\n",
       "                        39.084158,\n",
       "                        10987.852368497548\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6c99\",\n",
       "                    \"value\": [\n",
       "                        113,\n",
       "                        28.21,\n",
       "                        10847.045815941241\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u6ce2\",\n",
       "                    \"value\": [\n",
       "                        121.56,\n",
       "                        29.86,\n",
       "                        10809.416386083123\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        119.3,\n",
       "                        26.08,\n",
       "                        10062.398081534848\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u8fde\",\n",
       "                    \"value\": [\n",
       "                        121.62,\n",
       "                        38.92,\n",
       "                        10030.425752855752\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        106.551556,\n",
       "                        29.563009,\n",
       "                        10016.517509727699\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u5c9b\",\n",
       "                    \"value\": [\n",
       "                        120.33,\n",
       "                        36.07,\n",
       "                        9548.856799037349\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d4e\\u5357\",\n",
       "                    \"value\": [\n",
       "                        117,\n",
       "                        36.65,\n",
       "                        9375.090151002996\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5408\\u80a5\",\n",
       "                    \"value\": [\n",
       "                        117.27,\n",
       "                        31.86,\n",
       "                        9251.720395094035\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6625\",\n",
       "                    \"value\": [\n",
       "                        125.35,\n",
       "                        43.88,\n",
       "                        8579.913137893585\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6606\\u660e\",\n",
       "                    \"value\": [\n",
       "                        102.73,\n",
       "                        25.04,\n",
       "                        8457.888229475755\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u90d1\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.65,\n",
       "                        34.76,\n",
       "                        8348.115379082297\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c88\\u9633\",\n",
       "                    \"value\": [\n",
       "                        123.38,\n",
       "                        41.8,\n",
       "                        7850.849403122135\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u5c14\\u6ee8\",\n",
       "                    \"value\": [\n",
       "                        126.63,\n",
       "                        45.75,\n",
       "                        6402.6245210727275\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": false,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#404a59\",\n",
       "    \"animation\": true,\n",
       "    \"geo\": {\n",
       "        \"map\": \"china\",\n",
       "        \"roam\": true,\n",
       "        \"label\": {\n",
       "            \"emphasis\": {\n",
       "                \"show\": true,\n",
       "                \"textStyle\": {\n",
       "                    \"color\": \"#eee\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        \"itemStyle\": {\n",
       "            \"normal\": {\n",
       "                \"areaColor\": \"#323c48\",\n",
       "                \"borderColor\": \"#111\"\n",
       "            },\n",
       "            \"emphasis\": {\n",
       "                \"areaColor\": \"#2a333d\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 6402.6245210727275,\n",
       "        \"max\": 17453.108345993664,\n",
       "        \"text\": [\n",
       "            \"high\",\n",
       "            \"low\"\n",
       "        ],\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\"\n",
       "        },\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"left\",\n",
       "        \"top\": \"bottom\",\n",
       "        \"showLabel\": true\n",
       "    }\n",
       "};\n",
       "myChart_059c67ea61f3454fb6da93653f43208d.setOption(option_059c67ea61f3454fb6da93653f43208d);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.geo.Geo at 0x1ff0521f4a8>"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "symbol_size = [v/1000 for v in value]\n",
    "geo.add(\"\", attr, value, visual_range=[min(value), max(value)], maptype='china',visual_text_color=\"#fff\", symbol_size=10, is_visualmap=True, )\n",
    "geo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[13.823,\n",
       " 25.888,\n",
       " 20.757,\n",
       " 8.69,\n",
       " 17.068,\n",
       " 7.091,\n",
       " 7.028,\n",
       " 1.632,\n",
       " 3.833,\n",
       " 8.027,\n",
       " 1.147,\n",
       " 3.354,\n",
       " 1.485,\n",
       " 2.085,\n",
       " 2.889,\n",
       " 2.57,\n",
       " 1.385,\n",
       " 1.479,\n",
       " 3.071,\n",
       " 0.614,\n",
       " 1.011,\n",
       " 2.317,\n",
       " 1.452,\n",
       " 0.87]"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "symbol_size"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style>  \n",
       "<table id=\"T_8a1742e6_5844_11e9_9579_701ce71031ef\" > \n",
       "<thead>    <tr> \n",
       "        <th class=\"blank level0\" ></th> \n",
       "        <th class=\"col_heading level0 col0\" >city_</th> \n",
       "        <th class=\"col_heading level0 col1\" >salary_mean</th> \n",
       "        <th class=\"col_heading level0 col2\" >salary_median</th> \n",
       "        <th class=\"col_heading level0 col3\" >head_count</th> \n",
       "        <th class=\"col_heading level0 col4\" >percentage</th> \n",
       "    </tr></thead> \n",
       "<tbody>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row0\" class=\"row_heading level0 row0\" >17</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow0_col0\" class=\"data row0 col0\" >shanghai</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow0_col1\" class=\"data row0 col1\" >16626</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow0_col2\" class=\"data row0 col2\" >15000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow0_col3\" class=\"data row0 col3\" >25888</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow0_col4\" class=\"data row0 col4\" >18.55%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row1\" class=\"row_heading level0 row1\" >19</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow1_col0\" class=\"data row1 col0\" >shenzhen</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow1_col1\" class=\"data row1 col1\" >15631</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow1_col2\" class=\"data row1 col2\" >14000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow1_col3\" class=\"data row1 col3\" >20757</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow1_col4\" class=\"data row1 col4\" >14.87%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row2\" class=\"row_heading level0 row2\" >8</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow2_col0\" class=\"data row2 col0\" >guangzhou</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow2_col1\" class=\"data row2 col1\" >13032</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow2_col2\" class=\"data row2 col2\" >12000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow2_col3\" class=\"data row2 col3\" >17068</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow2_col4\" class=\"data row2 col4\" >12.23%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row3\" class=\"row_heading level0 row3\" >0</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow3_col0\" class=\"data row3 col0\" >beijing</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow3_col1\" class=\"data row3 col1\" >17453</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow3_col2\" class=\"data row3 col2\" >15000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow3_col3\" class=\"data row3 col3\" >13823</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow3_col4\" class=\"data row3 col4\" >9.90%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row4\" class=\"row_heading level0 row4\" >9</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow4_col0\" class=\"data row4 col0\" >hangzhou</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow4_col1\" class=\"data row4 col1\" >14977</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow4_col2\" class=\"data row4 col2\" >12500</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow4_col3\" class=\"data row4 col3\" >8690</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow4_col4\" class=\"data row4 col4\" >6.23%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row5\" class=\"row_heading level0 row5\" >21</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow5_col0\" class=\"data row5 col0\" >wuhan</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow5_col1\" class=\"data row5 col1\" >11074</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow5_col2\" class=\"data row5 col2\" >10417</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow5_col3\" class=\"data row5 col3\" >8027</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow5_col4\" class=\"data row5 col4\" >5.75%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row6\" class=\"row_heading level0 row6\" >14</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow6_col0\" class=\"data row6 col0\" >nanjing</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow6_col1\" class=\"data row6 col1\" >12874</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow6_col2\" class=\"data row6 col2\" >12500</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow6_col3\" class=\"data row6 col3\" >7091</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow6_col4\" class=\"data row6 col4\" >5.08%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row7\" class=\"row_heading level0 row7\" >3</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow7_col0\" class=\"data row7 col0\" >chengdu</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow7_col1\" class=\"data row7 col1\" >11896</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow7_col2\" class=\"data row7 col2\" >11500</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow7_col3\" class=\"data row7 col3\" >7028</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow7_col4\" class=\"data row7 col4\" >5.04%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row8\" class=\"row_heading level0 row8\" >22</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow8_col0\" class=\"data row8 col0\" >xian</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow8_col1\" class=\"data row8 col1\" >11075</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow8_col2\" class=\"data row8 col2\" >10000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow8_col3\" class=\"data row8 col3\" >3833</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow8_col4\" class=\"data row8 col4\" >2.75%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row9\" class=\"row_heading level0 row9\" >2</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow9_col0\" class=\"data row9 col0\" >changsha</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow9_col1\" class=\"data row9 col1\" >10847</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow9_col2\" class=\"data row9 col2\" >10000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow9_col3\" class=\"data row9 col3\" >3354</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow9_col4\" class=\"data row9 col4\" >2.40%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row10\" class=\"row_heading level0 row10\" >11</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow10_col0\" class=\"data row10 col0\" >hefei</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow10_col1\" class=\"data row10 col1\" >9252</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow10_col2\" class=\"data row10 col2\" >8500</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow10_col3\" class=\"data row10 col3\" >3071</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow10_col4\" class=\"data row10 col4\" >2.20%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row11\" class=\"row_heading level0 row11\" >5</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow11_col0\" class=\"data row11 col0\" >dalian</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow11_col1\" class=\"data row11 col1\" >10030</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow11_col2\" class=\"data row11 col2\" >9000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow11_col3\" class=\"data row11 col3\" >2889</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow11_col4\" class=\"data row11 col4\" >2.07%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row12\" class=\"row_heading level0 row12\" >4</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow12_col0\" class=\"data row12 col0\" >chongqing</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow12_col1\" class=\"data row12 col1\" >10017</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow12_col2\" class=\"data row12 col2\" >9000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow12_col3\" class=\"data row12 col3\" >2570</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow12_col4\" class=\"data row12 col4\" >1.84%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row13\" class=\"row_heading level0 row13\" >23</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow13_col0\" class=\"data row13 col0\" >zhengzhou</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow13_col1\" class=\"data row13 col1\" >8348</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow13_col2\" class=\"data row13 col2\" >7000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow13_col3\" class=\"data row13 col3\" >2317</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow13_col4\" class=\"data row13 col4\" >1.66%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row14\" class=\"row_heading level0 row14\" >7</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow14_col0\" class=\"data row14 col0\" >fuzhou</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow14_col1\" class=\"data row14 col1\" >10062</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow14_col2\" class=\"data row14 col2\" >9000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow14_col3\" class=\"data row14 col3\" >2085</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow14_col4\" class=\"data row14 col4\" >1.49%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row15\" class=\"row_heading level0 row15\" >6</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow15_col0\" class=\"data row15 col0\" >dongguan</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow15_col1\" class=\"data row15 col1\" >11353</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow15_col2\" class=\"data row15 col2\" >10417</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow15_col3\" class=\"data row15 col3\" >1632</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow15_col4\" class=\"data row15 col4\" >1.17%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row16\" class=\"row_heading level0 row16\" >15</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow16_col0\" class=\"data row16 col0\" >ningbo</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow16_col1\" class=\"data row16 col1\" >10809</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow16_col2\" class=\"data row16 col2\" >10000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow16_col3\" class=\"data row16 col3\" >1485</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow16_col4\" class=\"data row16 col4\" >1.06%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row17\" class=\"row_heading level0 row17\" >12</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow17_col0\" class=\"data row17 col0\" >jinan</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow17_col1\" class=\"data row17 col1\" >9375</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow17_col2\" class=\"data row17 col2\" >8500</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow17_col3\" class=\"data row17 col3\" >1479</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow17_col4\" class=\"data row17 col4\" >1.06%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row18\" class=\"row_heading level0 row18\" >18</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow18_col0\" class=\"data row18 col0\" >shenyang</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow18_col1\" class=\"data row18 col1\" >7851</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow18_col2\" class=\"data row18 col2\" >7000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow18_col3\" class=\"data row18 col3\" >1452</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow18_col4\" class=\"data row18 col4\" >1.04%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row19\" class=\"row_heading level0 row19\" >16</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow19_col0\" class=\"data row19 col0\" >qingdao</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow19_col1\" class=\"data row19 col1\" >9549</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow19_col2\" class=\"data row19 col2\" >8750</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow19_col3\" class=\"data row19 col3\" >1385</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow19_col4\" class=\"data row19 col4\" >0.99%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row20\" class=\"row_heading level0 row20\" >20</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow20_col0\" class=\"data row20 col0\" >tianjin</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow20_col1\" class=\"data row20 col1\" >10988</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow20_col2\" class=\"data row20 col2\" >10000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow20_col3\" class=\"data row20 col3\" >1147</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow20_col4\" class=\"data row20 col4\" >0.82%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row21\" class=\"row_heading level0 row21\" >13</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow21_col0\" class=\"data row21 col0\" >kuming</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow21_col1\" class=\"data row21 col1\" >8458</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow21_col2\" class=\"data row21 col2\" >8000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow21_col3\" class=\"data row21 col3\" >1011</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow21_col4\" class=\"data row21 col4\" >0.72%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row22\" class=\"row_heading level0 row22\" >10</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow22_col0\" class=\"data row22 col0\" >harbin</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow22_col1\" class=\"data row22 col1\" >6403</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow22_col2\" class=\"data row22 col2\" >5250</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow22_col3\" class=\"data row22 col3\" >870</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow22_col4\" class=\"data row22 col4\" >0.62%</td> \n",
       "    </tr>    <tr> \n",
       "        <th id=\"T_8a1742e6_5844_11e9_9579_701ce71031eflevel0_row23\" class=\"row_heading level0 row23\" >1</th> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow23_col0\" class=\"data row23 col0\" >changchun</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow23_col1\" class=\"data row23 col1\" >8580</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow23_col2\" class=\"data row23 col2\" >7000</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow23_col3\" class=\"data row23 col3\" >614</td> \n",
       "        <td id=\"T_8a1742e6_5844_11e9_9579_701ce71031efrow23_col4\" class=\"data row23 col4\" >0.44%</td> \n",
       "    </tr></tbody> \n",
       "</table> "
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x1e78d693908>"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_city.sort_values(by='head_count', ascending=False).style.format({\"percentage\":\"{:.2%}\",\"salary_mean\":\"{:.0f}\",\"salary_median\":\"{:.0f}\"})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "?geo.add"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'plotly'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-35-0780ae1c2704>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mplotly\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mplotly\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mpy\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mplotly\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgraph_objs\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mgo\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m trace0 = go.Scatter(\n\u001b[0;32m      5\u001b[0m     \u001b[0mx\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m3\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m4\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'plotly'"
     ]
    }
   ],
   "source": [
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "trace0 = go.Scatter(\n",
    "    x=[1, 2, 3, 4],\n",
    "    y=[10, 11, 12, 13],\n",
    "    mode='markers',\n",
    "    marker=dict(\n",
    "        color=['rgb(93, 164, 214)', 'rgb(255, 144, 14)',\n",
    "               'rgb(44, 160, 101)', 'rgb(255, 65, 54)'],\n",
    "        opacity=[1, 0.8, 0.6, 0.4],\n",
    "        size=[40, 60, 80, 100],\n",
    "    )\n",
    ")\n",
    "\n",
    "data = [trace0]\n",
    "py.iplot(data, filename='bubblechart-color')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
